home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 May / CHIP Turkiye Mayıs 1998.iso / internet / w32-252.exe / FILETYPE.PM < prev    next >
Text File  |  1997-01-01  |  3KB  |  85 lines

  1. ;
  2. ; Pegasus Mail System,
  3. ; Copyright (c) 1990-97, David Harris, All Rights Reserved.
  4. ;
  5. ; File Typing Rules
  6. ;
  7. ; This file is used by Pegasus Mail to determine the "attachment type"
  8. ; information for files automatically. It consists of rules that can
  9. ; test a file's extension and any byte or strings in the first 512
  10. ; bytes of the file. Each line contains the complete set of rules for
  11. ; a single type of file, in the following format:
  12. ;
  13. ;    <file type>,<match type>,<operation>[,<operation>...]
  14. ;
  15. ;       "file type" is the WinPMail "attachment type" string that
  16. ;           should be used if a file matches this rule
  17. ;       "match type" is one of the following values:
  18. ;           0 : Match is good if any operation succeeds
  19. ;           1 : Match is only good if all operations succeed
  20. ;
  21. ;    "operation" is one or more groups of three parameters in
  22. ;    the following format:
  23. ;       <opcode>,<offset>,<string>
  24. ;           "opcode" is one of the following characters:
  25. ;               X : match the file's extension
  26. ;               B : match the single byte contained in "string"
  27. ;                   at offset "offset" in the file
  28. ;               S : match the string contained in "string" starting
  29. ;                   at offset "offset" in the file
  30. ;           "offset" is the offset to start matching in the file. For
  31. ;               matches by extension, it should be set to 0
  32. ;           "string" is the string or byte to match. It can be ASCII
  33. ;               characters, or escapes in the form "\xxx", where "xxx"
  34. ;               is exactly three decimal characters.
  35. ;
  36. ;  Examples:
  37. ;     MS-Word,0,X,0,.DOC
  38. ;        - Returns "MS-Word" if the file's extension is ".DOC".
  39. ;
  40. ;    PCEXE,1,X,0,.EXE,S,0,MZ
  41. ;        - Returns "PCEXE" if the file's extension is ".EXE"
  42. ;          AND the first two characters in the file are "MZ".
  43. ;
  44. ;     ZIP-Archive,0,X,0,.ZIP,S,0,PK\003
  45. ;        - Returns "ZIP-Archive" if the file's extension is ".ZIP"
  46. ;          OR the first three characters are "PK" and an ASCII 3.
  47. ;
  48. ; The matching process ends on the first viable match. Because of this,
  49. ; if you have both a specific set of rules and a general set of rules
  50. ; for any single file type, you should always place the general rules
  51. ; after the specific rules in the file to allow more reliable matching.
  52. ;
  53. ; The parser for this file is inflexible - you must get the format
  54. ; right. Note in particular that whitespace is not permitted, or if it
  55. ; is present, it is assumed to be significant. The only valid delimiter
  56. ; in this file is a comma; the only way you can match a comma in a
  57. ; string is by using the escape "\044".
  58. ;
  59. ; Blank lines and lines in this file starting with ';' or '#' are
  60. ; regarded as comments and are ignored.
  61. ;
  62.  
  63. MS-Word,1,S,0,\219\165\045
  64. PCEXE,1,X,0,.EXE,S,0,MZ
  65. PCEXE,1,X,0,.DLL,S,0,MZ
  66. ZIP-archive,0,X,0,.ZIP,S,0,PK\003
  67. MS-Richtext,0,X,0,.RTF,S,0,{\092rtf
  68. Program-source,0,X,0,.C,X,0,.H,X,0,.PAS,X,0,.RC,X,0,.CPP,X,0,.BAS,X,0,.ASM
  69. GIF-image,0,X,0,.GIF,S,0,GIF
  70. JPEG-image,0,X,0,.JPG,S,6,JFIF
  71. BMP-image,0,X,0,.BMP,X,0,.DIB,S,0,BM
  72. WAV-sound-file,1,S,0,RIFF,S,8,WAVE
  73. WAV-sound-file,0,X,0,.WAV
  74. WordPerfect,0,S,1,WPC
  75. Excel-sheet,0,X,0,.XLS
  76. Excel-chart,0,X,0,.XLC
  77. MS-Access,0,X,0,.MDB
  78. AVI-Movie,1,S,0,RIFF,S,8,AVI
  79. AVI-Movie,0,X,0,.AVI
  80. Windows-help,1,X,0,.HLP,S,0,?_\003
  81. HTML-text,0,X,0,.HTM
  82. HTML-text,1,S,0,<HTML>
  83. PGP-encrypted,1,X,0,.PGP
  84.  
  85.